﻿@{
    ViewBag.Title = "Index";
    Layout = "/Views/Shared/Shared.cshtml";
    //var productPic = ViewBag.ProductPic as List<ProductPic>;
}

@model IEnumerable<UserAddress>;

<section>
    <div class="view-product">
        <div class="info-center">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">
                    地址管理
                </h6>
            </div>

            <div>
                <el-row :gutter="20">

                    <a asp-controller="YongHuZhongXin" asp-action="AddressCreate">
                    <el-button style="float:right" type="success" size="medium" plain>
                        <i class="el-icon-plus"></i>
                        新增收货地址
                    </el-button>
                    </a>

                    @foreach (var item in Model)
                    {
                        <el-col :span="20" style="padding-top:10px">
                            <el-card shadow="hover">
                                <div slot="header">
                                    <span>@item.Name</span>
                                    <el-button style="float:right;padding:3px 5px" typeof="text"><i class="el-icon-edit"></i> <el-link type="primary" href="/yonghuzhongxin/AddressEdit/@item.Id">编辑</el-link></el-button>
                                    <el-button style="float:right;padding:3px 5px" typeof="text"><i class="el-icon-delete"></i><el-link type="danger" href="/yonghuzhongxin/AddressDel/@item.Id">删除</el-link></el-button>
                                </div>
                                <div style="font-size:14px;">
                                    <div style="margin-bottom:12px;">手机号：@item.Phone</div>
                                    <div style="margin-bottom:12px;">国籍：@item.Nation</div>
                                    <div style="margin-bottom:12px;">省:@item.Province</div>
                                    <div style="margin-bottom:12px;">市:@item.City</div>
                                    <div style="margin-bottom:12px;">区域:@item.DisTrict</div>
                                    <div style="margin-bottom:12px;">详细地址:@item.DetailedAddress</div>
                                </div>
                            </el-card>
                        </el-col>
                    }
                </el-row>

                <br />
                <a asp-controller="YongHuZhongXin" asp-action="AddressCreate">
                    <el-button style="float:left" type="success" size="medium" plain>
                        <i class="el-icon-plus"></i>
                        新增收货地址
                    </el-button>
                </a>

            </div>
        </div>
    </div>
</section>